<template>
  <div class="setting">
    <div class="setting_body"><slot></slot></div>
    <div class="setting_bootom"><el-button v-if="hidden" :loading="isLoading" v-has size="medium" type="primary" @click="saveData">保存数据</el-button></div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      isLoading: false
    };
  },
  props:{
   hidden: {
     type: Boolean,
     default: true
   }
  },
  methods: {
    init() {
      this.isLoading = false;
    },
    saveData() {
      this.isLoading = true;
      this.$emit('submit');
    }
  }
};
</script>

<style lang="scss">
//覆盖样式
.main_con .edit_con .edit_content {
  border-bottom: 0;
}


.setting {
  background: #fff;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 150px);

  .setting_body {
    flex-grow: 1;
    overflow-y: auto;
    //padding-top: 20px;

    .setting_body_item {
      .header {
        background: #e0e3e8;
        height: 40px;
        line-height: 40px;
        padding-left: 20px;
        margin-top: 20px;
      }
    }
  }

  .setting_bootom {
    height: 60px;
    line-height: 60px;
    border-top: 1px solid #dcdfe6;
    text-align: center;
  }
}
/* //选择图标 */
.icon_box {
  width: 60px;
  height: 60px;
  line-height: 60px;
  text-align: center;
  cursor: pointer;
  border: 1px solid #dcdfe6;
  position: relative;

  .icon-abl-close {
    position: absolute;
    top: -6px;
    right: -9px;
    color: rgba(0, 0, 0, 0.3);
    font-size: 16px;
  }
  .noIcon {
    width: 60px;
    height: 60px;
    display: inline-block;
  }
  .iconfont {
    font-size: 30px;
  }
  &:hover {
    .choose_bar {
      display: block;
    }
  }

  .choose_bar {
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    font-size: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    line-height: 18px;
    text-align: center;
    width: 100%;

    i.txt {
      display: inline-block;
      font-style: normal;
      -webkit-transform: scale(0.75);
      transform: scale(0.75);
      letter-spacing: 2px;
    }
  }
}
.configuration {
  .el-input {
    width: 120px;
    margin: 0px 5px;
  }
}
</style>
